package client.orientdb;

import com.orientechnologies.orient.graph.batch.OGraphBatchInsert;
import org.apache.commons.lang.RandomStringUtils;

import java.util.HashMap;
import java.util.Map;

public class ClientTest {


    public static void main(String[] args){
        OGraphBatchInsert batch = new OGraphBatchInsert("remote:data-bridge-1/test", "admin", "admin");
        batch.begin();
        for(long i=0;i<1000;i++){
            Map<String, Object> edgeProps = new HashMap<>();
            edgeProps.put("foo", RandomStringUtils.randomAscii(10));
            batch.createEdge(i, i+1, edgeProps);
            batch.createVertex(i+2);
        }


        batch.end();
    }
}
